import { Component, OnInit } from '@angular/core';

@Component({
    selector: 'app-event-bind',
    templateUrl: './event-bind.component.html',
    styleUrls: ['./event-bind.component.less']
})
export class EventBindComponent implements OnInit {
    info = "字符串";
    user = {
        name:"tom",
        age:33
    }
    constructor() { }

    ngOnInit() {
    }

    printFun():void{
        console.log("自定义print方法");
    }
    showFun(){
        console.log("自定义show方法")
    }

    printArg(arg1?,arg2?,arg3?,arg4?){
        console.log(arg1,arg2,arg3,arg4);
        console.log("组件自定义方法this",this);
        console.log("通过this获取变量",this.info,this.user)
    }
    printThis(arg){
        console.log("页面this",arg)
    }
    printEvent(e){
        console.log("event",e);
    }
}
